package com.baizhi.controller;

import com.baizhi.annotation.InsertCacheAnnotation;
import com.baizhi.annotation.LogAnnotation;
import com.baizhi.annotation.LogType;
import com.baizhi.entity.Menu;
import com.baizhi.service.MenuService;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("menu")
public class MenuCotroller {
    @Autowired
    private MenuService ms;

    @InsertCacheAnnotation
    @LogAnnotation(type = LogType.INSERT,value = "查询菜单")
    @RequestMapping("menuList")
    public List<Menu> menuList(){
        return  ms.menuList();

    }



}
